package com.yilin.tms.truck.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yilin.tms.core.application.PageData;
import com.yilin.tms.core.entity.truck.TruckSource;
import com.yilin.tms.core.entity.user.account.Account;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 车辆Mapper
 *
 * @author zhangjinyuan
 * @date 2022/10/24
 */
@Mapper
@Repository
public interface TruckSourceMapper extends BaseMapper<TruckSource> {

    /**
     * 获取车源分页
     * 按距离排序时传入position即可，无需传入sort
     */
    PageData<TruckSource> getTruckSourcePage(@Param("page") PageData<TruckSource> page, @Param("loginUser") Account loginUser,
                                             @Param("query") TruckSource query, @Param("statuses") List<Integer> statuses);


}
